package com.dsh.authorityManagement.dao;

import com.dsh.authorityManagement.entity.AdminPermission;
import com.dsh.authorityManagement.entity.RoleModel;
import com.dsh.authorityManagement.entity.vo.IdsVo;
import com.dsh.authorityManagement.entity.vo.PermissionMenuVo;
import com.dsh.authorityManagement.entity.vo.UserForPermissionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminPermissionDao {
    List<AdminPermission> selectPermissionTree();

    List<RoleModel> selectAllRole();

    int insertPermissionForRoleAndStoreAndAdmin(@Param("idsVo") IdsVo idsVo);

    int selectShipForUserIdAndPermission(@Param("userId") Integer userId, @Param("permissionId") Integer permissionId);

    int deleteShip(@Param("id") int id);

    List<UserForPermissionVo> selectUserForRoleAndStore(@Param("pId") int pId, @Param("sId") int sId);

    List<PermissionMenuVo> selectLoginSuccessMenu(@Param("userId") int userId);
}
